home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Bank smakow / BankSmakow.air / BankSmakow.swf / scripts / BankSmakow.as < prev    next >
Text File  |  2009-12-16  |  36KB  |  896 lines

  1. package
  2. {
  3.    import air.update.ApplicationUpdaterUI;
  4.    import com.adobe.cairngorm.control.CairngormEventDispatcher;
  5.    import com.makingwaves.config.Configuration;
  6.    import com.makingwaves.controller.Controller;
  7.    import com.makingwaves.events.LoadDataEvent;
  8.    import com.makingwaves.events.LoadLocalDataEvent;
  9.    import com.makingwaves.logic.LocalFridge;
  10.    import com.makingwaves.sql.DatabaseManager;
  11.    import com.makingwaves.view.MainView;
  12.    import flash.events.Event;
  13.    import flash.events.IOErrorEvent;
  14.    import flash.net.URLLoader;
  15.    import flash.net.URLRequest;
  16.    import flash.system.Capabilities;
  17.    import mx.core.UIComponentDescriptor;
  18.    import mx.core.WindowedApplication;
  19.    import mx.core.mx_internal;
  20.    import mx.events.AIREvent;
  21.    import mx.events.FlexEvent;
  22.    import mx.events.PropertyChangeEvent;
  23.    import mx.styles.CSSStyleDeclaration;
  24.    import mx.styles.StyleManager;
  25.    
  26.    use namespace mx_internal;
  27.    
  28.    public class BankSmakow extends WindowedApplication
  29.    {
  30.       
  31.       mx_internal static var _BankSmakow_StylesInit_done:Boolean = false;
  32.        
  33.       
  34.       private var _embed_css____assets_print_icon_png_92642463:Class;
  35.       
  36.       private var _embed_css____assets_close_png_1664660227:Class;
  37.       
  38.       private var _3619493view:MainView;
  39.       
  40.       private var _embed_css____assets_check_png_2076268035:Class;
  41.       
  42.       private var _embed_css____assets_reset_png_1335965817:Class;
  43.       
  44.       private var _embed_css____assets_check_3_png_347691139:Class;
  45.       
  46.       private var _embed__font_Segoe_bold_normal_1615122434:Class;
  47.       
  48.       private var _637428636controller:Controller;
  49.       
  50.       private var _embed_css____assets_check_2_png_344324487:Class;
  51.       
  52.       private var _embed_css____assets_configuration_png_822067165:Class;
  53.       
  54.       private var _embed_css____assets_about_png_542010887:Class;
  55.       
  56.       private var _embed_css____assets_skins_swf_ThumbTrack_1922948728:Class;
  57.       
  58.       private var _embed_css____assets_close_2_png_897770631:Class;
  59.       
  60.       private var _embed_css____assets_skins_swf_ThumbBar_209368864:Class;
  61.       
  62.       private var _embed_css____assets_details_close_png_557543367:Class;
  63.       
  64.       private var _embed_css____assets_checkChecked_3_png_2092627593:Class;
  65.       
  66.       private var _embed_css____assets_categoryOpened_png_1130679933:Class;
  67.       
  68.       private var _embed_css____assets_checkChecked_2_png_2082817921:Class;
  69.       
  70.       private var _embed_css____assets_background_png_1753739099:Class;
  71.       
  72.       private var _embed_css____assets_minimize_png_617510363:Class;
  73.       
  74.       private var _embed_css____assets_skins_swf_ThumbUp_1589808316:Class;
  75.       
  76.       private var _embed__font_Myriad_medium_normal_427115143:Class;
  77.       
  78.       private var _embed_css____assets_categoryClosed_png_1536913883:Class;
  79.       
  80.       private var _embed_css____assets_skins_swf_ThumbDown_1412742105:Class;
  81.       
  82.       private var _embed_css____assets_notification_png_1486160547:Class;
  83.       
  84.       private var _embed__font_Segoe_medium_normal_566201103:Class;
  85.       
  86.       private var appUpdater:ApplicationUpdaterUI;
  87.       
  88.       private var _documentDescriptor_:UIComponentDescriptor;
  89.       
  90.       private var _embed_css____assets_checkChecked_png_2019325651:Class;
  91.       
  92.       public function BankSmakow()
  93.       {
  94.          _documentDescriptor_ = new UIComponentDescriptor({
  95.             "type":WindowedApplication,
  96.             "propertiesFactory":function():Object
  97.             {
  98.                return {
  99.                   "width":925,
  100.                   "height":790,
  101.                   "childDescriptors":[new UIComponentDescriptor({
  102.                      "type":MainView,
  103.                      "id":"view",
  104.                      "propertiesFactory":function():Object
  105.                      {
  106.                         return {"y":50};
  107.                      }
  108.                   })]
  109.                };
  110.             }
  111.          });
  112.          appUpdater = new ApplicationUpdaterUI();
  113.          _embed__font_Myriad_medium_normal_427115143 = BankSmakow__embed__font_Myriad_medium_normal_427115143;
  114.          _embed__font_Segoe_bold_normal_1615122434 = BankSmakow__embed__font_Segoe_bold_normal_1615122434;
  115.          _embed__font_Segoe_medium_normal_566201103 = BankSmakow__embed__font_Segoe_medium_normal_566201103;
  116.          _embed_css____assets_about_png_542010887 = BankSmakow__embed_css____assets_about_png_542010887;
  117.          _embed_css____assets_background_png_1753739099 = BankSmakow__embed_css____assets_background_png_1753739099;
  118.          _embed_css____assets_categoryClosed_png_1536913883 = BankSmakow__embed_css____assets_categoryClosed_png_1536913883;
  119.          _embed_css____assets_categoryOpened_png_1130679933 = BankSmakow__embed_css____assets_categoryOpened_png_1130679933;
  120.          _embed_css____assets_checkChecked_2_png_2082817921 = BankSmakow__embed_css____assets_checkChecked_2_png_2082817921;
  121.          _embed_css____assets_checkChecked_3_png_2092627593 = BankSmakow__embed_css____assets_checkChecked_3_png_2092627593;
  122.          _embed_css____assets_checkChecked_png_2019325651 = BankSmakow__embed_css____assets_checkChecked_png_2019325651;
  123.          _embed_css____assets_check_2_png_344324487 = BankSmakow__embed_css____assets_check_2_png_344324487;
  124.          _embed_css____assets_check_3_png_347691139 = BankSmakow__embed_css____assets_check_3_png_347691139;
  125.          _embed_css____assets_check_png_2076268035 = BankSmakow__embed_css____assets_check_png_2076268035;
  126.          _embed_css____assets_close_2_png_897770631 = BankSmakow__embed_css____assets_close_2_png_897770631;
  127.          _embed_css____assets_close_png_1664660227 = BankSmakow__embed_css____assets_close_png_1664660227;
  128.          _embed_css____assets_configuration_png_822067165 = BankSmakow__embed_css____assets_configuration_png_822067165;
  129.          _embed_css____assets_details_close_png_557543367 = BankSmakow__embed_css____assets_details_close_png_557543367;
  130.          _embed_css____assets_minimize_png_617510363 = BankSmakow__embed_css____assets_minimize_png_617510363;
  131.          _embed_css____assets_notification_png_1486160547 = BankSmakow__embed_css____assets_notification_png_1486160547;
  132.          _embed_css____assets_print_icon_png_92642463 = BankSmakow__embed_css____assets_print_icon_png_92642463;
  133.          _embed_css____assets_reset_png_1335965817 = BankSmakow__embed_css____assets_reset_png_1335965817;
  134.          _embed_css____assets_skins_swf_ThumbBar_209368864 = BankSmakow__embed_css____assets_skins_swf_ThumbBar_209368864;
  135.          _embed_css____assets_skins_swf_ThumbDown_1412742105 = BankSmakow__embed_css____assets_skins_swf_ThumbDown_1412742105;
  136.          _embed_css____assets_skins_swf_ThumbTrack_1922948728 = BankSmakow__embed_css____assets_skins_swf_ThumbTrack_1922948728;
  137.          _embed_css____assets_skins_swf_ThumbUp_1589808316 = BankSmakow__embed_css____assets_skins_swf_ThumbUp_1589808316;
  138.          super();
  139.          mx_internal::_document = this;
  140.          if(!this.styleDeclaration)
  141.          {
  142.             this.styleDeclaration = new CSSStyleDeclaration();
  143.          }
  144.          this.styleDeclaration.defaultFactory = function():void
  145.          {
  146.             this.showFlexChrome = false;
  147.          };
  148.          mx_internal::_BankSmakow_StylesInit();
  149.          this.layout = "absolute";
  150.          this.width = 925;
  151.          this.height = 790;
  152.          this.showTitleBar = false;
  153.          this.showStatusBar = false;
  154.          this.horizontalScrollPolicy = "off";
  155.          this.verticalScrollPolicy = "off";
  156.          _BankSmakow_Controller1_i();
  157.          this.addEventListener("windowComplete",___BankSmakow_WindowedApplication1_windowComplete);
  158.          this.addEventListener("creationComplete",___BankSmakow_WindowedApplication1_creationComplete);
  159.          this.addEventListener("remove",___BankSmakow_WindowedApplication1_remove);
  160.       }
  161.       
  162.       private function updateFail(param1:Event) : void
  163.       {
  164.       }
  165.       
  166.       private function onWindowComplete(param1:Event) : void
  167.       {
  168.          nativeWindow.x = (Capabilities.screenResolutionX - nativeWindow.width) / 2;
  169.          nativeWindow.y = (Capabilities.screenResolutionY - nativeWindow.height) / 2;
  170.          nativeWindow.visible = true;
  171.          CairngormEventDispatcher.getInstance().dispatchEvent(new LoadLocalDataEvent());
  172.          CairngormEventDispatcher.getInstance().dispatchEvent(new LoadDataEvent());
  173.       }
  174.       
  175.       override public function initialize() : void
  176.       {
  177.          mx_internal::setDocumentDescriptor(_documentDescriptor_);
  178.          super.initialize();
  179.       }
  180.       
  181.       public function ___BankSmakow_WindowedApplication1_windowComplete(param1:AIREvent) : void
  182.       {
  183.          onWindowComplete(param1);
  184.       }
  185.       
  186.       public function set controller(param1:Controller) : void
  187.       {
  188.          var _loc2_:Object = this._637428636controller;
  189.          if(_loc2_ !== param1)
  190.          {
  191.             this._637428636controller = param1;
  192.             this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"controller",_loc2_,param1));
  193.          }
  194.       }
  195.       
  196.       [Bindable(event="propertyChange")]
  197.       public function get view() : MainView
  198.       {
  199.          return this._3619493view;
  200.       }
  201.       
  202.       private function onRemove(param1:Event) : void
  203.       {
  204.          DatabaseManager.getInstance().close();
  205.       }
  206.       
  207.       [Bindable(event="propertyChange")]
  208.       public function get controller() : Controller
  209.       {
  210.          return this._637428636controller;
  211.       }
  212.       
  213.       public function ___BankSmakow_WindowedApplication1_creationComplete(param1:FlexEvent) : void
  214.       {
  215.          checkUpdate(param1);
  216.       }
  217.       
  218.       public function set view(param1:MainView) : void
  219.       {
  220.          var _loc2_:Object = this._3619493view;
  221.          if(_loc2_ !== param1)
  222.          {
  223.             this._3619493view = param1;
  224.             this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"view",_loc2_,param1));
  225.          }
  226.       }
  227.       
  228.       public function ___BankSmakow_WindowedApplication1_remove(param1:FlexEvent) : void
  229.       {
  230.          onRemove(param1);
  231.       }
  232.       
  233.       private function _BankSmakow_Controller1_i() : Controller
  234.       {
  235.          var _loc1_:Controller = new Controller();
  236.          controller = _loc1_;
  237.          return _loc1_;
  238.       }
  239.       
  240.       mx_internal function _BankSmakow_StylesInit() : void
  241.       {
  242.          var style:CSSStyleDeclaration = null;
  243.          var effects:Array = null;
  244.          if(mx_internal::_BankSmakow_StylesInit_done)
  245.          {
  246.             return;
  247.          }
  248.          mx_internal::_BankSmakow_StylesInit_done = true;
  249.          style = StyleManager.getStyleDeclaration(".RecipeDetailsTitle");
  250.          if(!style)
  251.          {
  252.             style = new CSSStyleDeclaration();
  253.             StyleManager.setStyleDeclaration(".RecipeDetailsTitle",style,false);
  254.          }
  255.          if(style.factory == null)
  256.          {
  257.             style.factory = function():void
  258.             {
  259.                this.leading = 0.5;
  260.                this.fontSize = 20;
  261.             };
  262.          }
  263.          style = StyleManager.getStyleDeclaration(".ManuButton");
  264.          if(!style)
  265.          {
  266.             style = new CSSStyleDeclaration();
  267.             StyleManager.setStyleDeclaration(".ManuButton",style,false);
  268.          }
  269.          if(style.factory == null)
  270.          {
  271.             style.factory = function():void
  272.             {
  273.                this.color = 16777215;
  274.                this.skin = null;
  275.                this.fontWeight = "normal";
  276.                this.fontSize = 13;
  277.             };
  278.          }
  279.          style = StyleManager.getStyleDeclaration("Application");
  280.          if(!style)
  281.          {
  282.             style = new CSSStyleDeclaration();
  283.             StyleManager.setStyleDeclaration("Application",style,false);
  284.          }
  285.          if(style.factory == null)
  286.          {
  287.             style.factory = function():void
  288.             {
  289.                this.color = 2627846;
  290.                this.fontWeight = "normal";
  291.                this.padding = 0;
  292.                this.marginRight = 0;
  293.                this.backgroundImage = _embed_css____assets_background_png_1753739099;
  294.                this.marginLeft = 0;
  295.                this.marginTop = 0;
  296.                this.backgroundSize = "100%";
  297.                this.backgroundColor = 16777215;
  298.                this.marginBottom = 0;
  299.                this.fontFamily = "Segoe";
  300.             };
  301.          }
  302.          style = StyleManager.getStyleDeclaration(".RecipeDetailsPreparationPrint");
  303.          if(!style)
  304.          {
  305.             style = new CSSStyleDeclaration();
  306.             StyleManager.setStyleDeclaration(".RecipeDetailsPreparationPrint",style,false);
  307.          }
  308.          if(style.factory == null)
  309.          {
  310.             style.factory = function():void
  311.             {
  312.                this.color = 0;
  313.                this.fontSize = 13;
  314.             };
  315.          }
  316.          style = StyleManager.getStyleDeclaration(".Close");
  317.          if(!style)
  318.          {
  319.             style = new CSSStyleDeclaration();
  320.             StyleManager.setStyleDeclaration(".Close",style,false);
  321.          }
  322.          if(style.factory == null)
  323.          {
  324.             style.factory = function():void
  325.             {
  326.                this.selectedDownSkin = _embed_css____assets_close_png_1664660227;
  327.                this.selectedUpSkin = _embed_css____assets_close_png_1664660227;
  328.                this.selectedOverSkin = _embed_css____assets_close_png_1664660227;
  329.                this.upSkin = _embed_css____assets_close_png_1664660227;
  330.                this.downSkin = _embed_css____assets_close_png_1664660227;
  331.                this.overSkin = _embed_css____assets_close_png_1664660227;
  332.                this.selectedDisabledSkin = _embed_css____assets_close_png_1664660227;
  333.                this.disabledSkin = _embed_css____assets_close_png_1664660227;
  334.             };
  335.          }
  336.          style = StyleManager.getStyleDeclaration("CheckBox");
  337.          if(!style)
  338.          {
  339.             style = new CSSStyleDeclaration();
  340.             StyleManager.setStyleDeclaration("CheckBox",style,false);
  341.          }
  342.          if(style.factory == null)
  343.          {
  344.             style.factory = function():void
  345.             {
  346.                this.disabledIcon = _embed_css____assets_check_png_2076268035;
  347.                this.selectedDisabledIcon = _embed_css____assets_checkChecked_png_2019325651;
  348.                this.cornerRadius = 0;
  349.                this.selectedOverIcon = _embed_css____assets_checkChecked_png_2019325651;
  350.                this.overIcon = _embed_css____assets_check_png_2076268035;
  351.                this.upIcon = _embed_css____assets_check_png_2076268035;
  352.                this.selectedDownIcon = _embed_css____assets_checkChecked_png_2019325651;
  353.                this.selectedUpIcon = _embed_css____assets_checkChecked_png_2019325651;
  354.                this.downIcon = _embed_css____assets_check_png_2076268035;
  355.             };
  356.          }
  357.          style = StyleManager.getStyleDeclaration(".Recipes");
  358.          if(!style)
  359.          {
  360.             style = new CSSStyleDeclaration();
  361.             StyleManager.setStyleDeclaration(".Recipes",style,false);
  362.          }
  363.          if(style.factory == null)
  364.          {
  365.             style.factory = function():void
  366.             {
  367.                this.backgroundAlpha = 0;
  368.                this.borderThickness = 0;
  369.                this.paddingBottom = -5;
  370.             };
  371.          }
  372.          style = StyleManager.getStyleDeclaration(".ShowNew");
  373.          if(!style)
  374.          {
  375.             style = new CSSStyleDeclaration();
  376.             StyleManager.setStyleDeclaration(".ShowNew",style,false);
  377.          }
  378.          if(style.factory == null)
  379.          {
  380.             style.factory = function():void
  381.             {
  382.                this.selectedDisabledIcon = _embed_css____assets_checkChecked_2_png_2082817921;
  383.                this.selectedOverIcon = _embed_css____assets_checkChecked_2_png_2082817921;
  384.                this.textRollOverColor = 170555;
  385.                this.overIcon = _embed_css____assets_check_2_png_344324487;
  386.                this.fontSize = 13;
  387.                this.labelOffset = 0;
  388.                this.selectedDownIcon = _embed_css____assets_checkChecked_2_png_2082817921;
  389.                this.disabledIcon = _embed_css____assets_check_2_png_344324487;
  390.                this.color = 170555;
  391.                this.upIcon = _embed_css____assets_check_2_png_344324487;
  392.                this.selectedUpIcon = _embed_css____assets_checkChecked_2_png_2082817921;
  393.                this.textSelectedColor = 170555;
  394.                this.downIcon = _embed_css____assets_check_2_png_344324487;
  395.             };
  396.          }
  397.          style = StyleManager.getStyleDeclaration(".Minimize");
  398.          if(!style)
  399.          {
  400.             style = new CSSStyleDeclaration();
  401.             StyleManager.setStyleDeclaration(".Minimize",style,false);
  402.          }
  403.          if(style.factory == null)
  404.          {
  405.             style.factory = function():void
  406.             {
  407.                this.selectedDownSkin = _embed_css____assets_minimize_png_617510363;
  408.                this.selectedUpSkin = _embed_css____assets_minimize_png_617510363;
  409.                this.selectedOverSkin = _embed_css____assets_minimize_png_617510363;
  410.                this.upSkin = _embed_css____assets_minimize_png_617510363;
  411.                this.downSkin = _embed_css____assets_minimize_png_617510363;
  412.                this.overSkin = _embed_css____assets_minimize_png_617510363;
  413.                this.selectedDisabledSkin = _embed_css____assets_minimize_png_617510363;
  414.                this.disabledSkin = _embed_css____assets_minimize_png_617510363;
  415.             };
  416.          }
  417.          style = StyleManager.getStyleDeclaration(".Description");
  418.          if(!style)
  419.          {
  420.             style = new CSSStyleDeclaration();
  421.             StyleManager.setStyleDeclaration(".Description",style,false);
  422.          }
  423.          if(style.factory == null)
  424.          {
  425.             style.factory = function():void
  426.             {
  427.                this.fontWeight = "normal";
  428.                this.leading = -1;
  429.                this.fontSize = 12;
  430.             };
  431.          }
  432.          style = StyleManager.getStyleDeclaration(".LinkHoover");
  433.          if(!style)
  434.          {
  435.             style = new CSSStyleDeclaration();
  436.             StyleManager.setStyleDeclaration(".LinkHoover",style,false);
  437.          }
  438.          if(style.factory == null)
  439.          {
  440.             style.factory = function():void
  441.             {
  442.                this.skin = null;
  443.                this.color = 16777215;
  444.                this.fontWeight = "normal";
  445.                this.textRollOverColor = 16777215;
  446.                this.textDecoration = "underline";
  447.                this.fontSize = 14;
  448.                this.textSelectedColor = 16777215;
  449.             };
  450.          }
  451.          style = StyleManager.getStyleDeclaration(".Configuration");
  452.          if(!style)
  453.          {
  454.             style = new CSSStyleDeclaration();
  455.             StyleManager.setStyleDeclaration(".Configuration",style,false);
  456.          }
  457.          if(style.factory == null)
  458.          {
  459.             style.factory = function():void
  460.             {
  461.                this.color = 16777215;
  462.                this.fontWeight = "bold";
  463.                this.fontSize = 15;
  464.                this.backgroundImage = _embed_css____assets_configuration_png_822067165;
  465.                this.fontFamily = "Segoe";
  466.             };
  467.          }
  468.          style = StyleManager.getStyleDeclaration(".About");
  469.          if(!style)
  470.          {
  471.             style = new CSSStyleDeclaration();
  472.             StyleManager.setStyleDeclaration(".About",style,false);
  473.          }
  474.          if(style.factory == null)
  475.          {
  476.             style.factory = function():void
  477.             {
  478.                this.color = 16777215;
  479.                this.fontWeight = "bold";
  480.                this.fontSize = 15;
  481.                this.backgroundImage = _embed_css____assets_about_png_542010887;
  482.                this.fontFamily = "Segoe";
  483.             };
  484.          }
  485.          style = StyleManager.getStyleDeclaration(".RecipeDetailsPreparationTitlePrint");
  486.          if(!style)
  487.          {
  488.             style = new CSSStyleDeclaration();
  489.             StyleManager.setStyleDeclaration(".RecipeDetailsPreparationTitlePrint",style,false);
  490.          }
  491.          if(style.factory == null)
  492.          {
  493.             style.factory = function():void
  494.             {
  495.                this.color = 0;
  496.                this.fontSize = 15;
  497.             };
  498.          }
  499.          style = StyleManager.getStyleDeclaration(".Notification");
  500.          if(!style)
  501.          {
  502.             style = new CSSStyleDeclaration();
  503.             StyleManager.setStyleDeclaration(".Notification",style,false);
  504.          }
  505.          if(style.factory == null)
  506.          {
  507.             style.factory = function():void
  508.             {
  509.                this.color = 16777215;
  510.                this.fontWeight = "bold";
  511.                this.fontSize = 15;
  512.                this.backgroundImage = _embed_css____assets_notification_png_1486160547;
  513.                this.fontFamily = "Segoe";
  514.             };
  515.          }
  516.          style = StyleManager.getStyleDeclaration(".Link");
  517.          if(!style)
  518.          {
  519.             style = new CSSStyleDeclaration();
  520.             StyleManager.setStyleDeclaration(".Link",style,false);
  521.          }
  522.          if(style.factory == null)
  523.          {
  524.             style.factory = function():void
  525.             {
  526.                this.skin = null;
  527.                this.color = 16777215;
  528.                this.fontWeight = "normal";
  529.                this.textRollOverColor = 16777215;
  530.                this.textDecoration = "none";
  531.                this.fontSize = 14;
  532.                this.textSelectedColor = 16777215;
  533.             };
  534.          }
  535.          style = StyleManager.getStyleDeclaration(".RecipeTitle");
  536.          if(!style)
  537.          {
  538.             style = new CSSStyleDeclaration();
  539.             StyleManager.setStyleDeclaration(".RecipeTitle",style,false);
  540.          }
  541.          if(style.factory == null)
  542.          {
  543.             style.factory = function():void
  544.             {
  545.                this.fontSize = 20;
  546.             };
  547.          }
  548.          style = StyleManager.getStyleDeclaration(".Reset");
  549.          if(!style)
  550.          {
  551.             style = new CSSStyleDeclaration();
  552.             StyleManager.setStyleDeclaration(".Reset",style,false);
  553.          }
  554.          if(style.factory == null)
  555.          {
  556.             style.factory = function():void
  557.             {
  558.                this.disabledIcon = _embed_css____assets_reset_png_1335965817;
  559.                this.selectedDisabledIcon = _embed_css____assets_reset_png_1335965817;
  560.                this.skin = null;
  561.                this.selectedOverIcon = _embed_css____assets_reset_png_1335965817;
  562.                this.overIcon = _embed_css____assets_reset_png_1335965817;
  563.                this.upIcon = _embed_css____assets_reset_png_1335965817;
  564.                this.fontSize = 14;
  565.                this.selectedDownIcon = _embed_css____assets_reset_png_1335965817;
  566.                this.selectedUpIcon = _embed_css____assets_reset_png_1335965817;
  567.                this.downIcon = _embed_css____assets_reset_png_1335965817;
  568.             };
  569.          }
  570.          style = StyleManager.getStyleDeclaration(".PopupCloseButton");
  571.          if(!style)
  572.          {
  573.             style = new CSSStyleDeclaration();
  574.             StyleManager.setStyleDeclaration(".PopupCloseButton",style,false);
  575.          }
  576.          if(style.factory == null)
  577.          {
  578.             style.factory = function():void
  579.             {
  580.                this.selectedDownSkin = _embed_css____assets_close_2_png_897770631;
  581.                this.selectedUpSkin = _embed_css____assets_close_2_png_897770631;
  582.                this.selectedOverSkin = _embed_css____assets_close_2_png_897770631;
  583.                this.upSkin = _embed_css____assets_close_2_png_897770631;
  584.                this.downSkin = _embed_css____assets_close_2_png_897770631;
  585.                this.overSkin = _embed_css____assets_close_2_png_897770631;
  586.                this.selectedDisabledSkin = _embed_css____assets_close_2_png_897770631;
  587.                this.disabledSkin = _embed_css____assets_close_2_png_897770631;
  588.             };
  589.          }
  590.          style = StyleManager.getStyleDeclaration(".Option");
  591.          if(!style)
  592.          {
  593.             style = new CSSStyleDeclaration();
  594.             StyleManager.setStyleDeclaration(".Option",style,false);
  595.          }
  596.          if(style.factory == null)
  597.          {
  598.             style.factory = function():void
  599.             {
  600.                this.selectedDisabledIcon = _embed_css____assets_checkChecked_3_png_2092627593;
  601.                this.fontWeight = "normal";
  602.                this.selectedOverIcon = _embed_css____assets_checkChecked_3_png_2092627593;
  603.                this.textRollOverColor = 16777215;
  604.                this.overIcon = _embed_css____assets_check_3_png_347691139;
  605.                this.leading = -4;
  606.                this.fontSize = 13;
  607.                this.selectedDownIcon = _embed_css____assets_checkChecked_3_png_2092627593;
  608.                this.disabledIcon = _embed_css____assets_check_3_png_347691139;
  609.                this.upIcon = _embed_css____assets_check_3_png_347691139;
  610.                this.selectedUpIcon = _embed_css____assets_checkChecked_3_png_2092627593;
  611.                this.textSelectedColor = 16777215;
  612.                this.downIcon = _embed_css____assets_check_3_png_347691139;
  613.             };
  614.          }
  615.          style = StyleManager.getStyleDeclaration(".RecipeClose");
  616.          if(!style)
  617.          {
  618.             style = new CSSStyleDeclaration();
  619.             StyleManager.setStyleDeclaration(".RecipeClose",style,false);
  620.          }
  621.          if(style.factory == null)
  622.          {
  623.             style.factory = function():void
  624.             {
  625.                this.selectedDownSkin = _embed_css____assets_details_close_png_557543367;
  626.                this.selectedUpSkin = _embed_css____assets_details_close_png_557543367;
  627.                this.selectedOverSkin = _embed_css____assets_details_close_png_557543367;
  628.                this.upSkin = _embed_css____assets_details_close_png_557543367;
  629.                this.downSkin = _embed_css____assets_details_close_png_557543367;
  630.                this.overSkin = _embed_css____assets_details_close_png_557543367;
  631.                this.selectedDisabledSkin = _embed_css____assets_details_close_png_557543367;
  632.                this.disabledSkin = _embed_css____assets_details_close_png_557543367;
  633.             };
  634.          }
  635.          style = StyleManager.getStyleDeclaration(".Heading");
  636.          if(!style)
  637.          {
  638.             style = new CSSStyleDeclaration();
  639.             StyleManager.setStyleDeclaration(".Heading",style,false);
  640.          }
  641.          if(style.factory == null)
  642.          {
  643.             style.factory = function():void
  644.             {
  645.                this.color = 0;
  646.                this.fontSize = 16;
  647.             };
  648.          }
  649.          style = StyleManager.getStyleDeclaration(".RecipeDetailsPreparation");
  650.          if(!style)
  651.          {
  652.             style = new CSSStyleDeclaration();
  653.             StyleManager.setStyleDeclaration(".RecipeDetailsPreparation",style,false);
  654.          }
  655.          if(style.factory == null)
  656.          {
  657.             style.factory = function():void
  658.             {
  659.                this.fontSize = 13;
  660.             };
  661.          }
  662.          style = StyleManager.getStyleDeclaration(".TitleSmall");
  663.          if(!style)
  664.          {
  665.             style = new CSSStyleDeclaration();
  666.             StyleManager.setStyleDeclaration(".TitleSmall",style,false);
  667.          }
  668.          if(style.factory == null)
  669.          {
  670.             style.factory = function():void
  671.             {
  672.                this.paddingTop = 5;
  673.                this.color = 16777215;
  674.                this.fontWeight = "bold";
  675.                this.fontSize = 12;
  676.             };
  677.          }
  678.          style = StyleManager.getStyleDeclaration(".RecipeSubtitle");
  679.          if(!style)
  680.          {
  681.             style = new CSSStyleDeclaration();
  682.             StyleManager.setStyleDeclaration(".RecipeSubtitle",style,false);
  683.          }
  684.          if(style.factory == null)
  685.          {
  686.             style.factory = function():void
  687.             {
  688.                this.fontSize = 13;
  689.             };
  690.          }
  691.          style = StyleManager.getStyleDeclaration(".Ingredients");
  692.          if(!style)
  693.          {
  694.             style = new CSSStyleDeclaration();
  695.             StyleManager.setStyleDeclaration(".Ingredients",style,false);
  696.          }
  697.          if(style.factory == null)
  698.          {
  699.             style.factory = function():void
  700.             {
  701.                this.paddingLeft = 0;
  702.                this.defaultLeafIcon = null;
  703.                this.folderClosedIcon = null;
  704.                this.fontSize = 20;
  705.                this.backgroundAlpha = 0;
  706.                this.borderThickness = 0;
  707.                this.disclosureClosedIcon = _embed_css____assets_categoryClosed_png_1536913883;
  708.                this.paddingBottom = -15;
  709.                this.disclosureOpenIcon = _embed_css____assets_categoryOpened_png_1130679933;
  710.                this.folderOpenIcon = null;
  711.                this.fontFamily = "Segoe";
  712.             };
  713.          }
  714.          style = StyleManager.getStyleDeclaration(".RecipeDetailsPreparationTitle");
  715.          if(!style)
  716.          {
  717.             style = new CSSStyleDeclaration();
  718.             StyleManager.setStyleDeclaration(".RecipeDetailsPreparationTitle",style,false);
  719.          }
  720.          if(style.factory == null)
  721.          {
  722.             style.factory = function():void
  723.             {
  724.                this.fontSize = 15;
  725.             };
  726.          }
  727.          style = StyleManager.getStyleDeclaration(".Ingredient");
  728.          if(!style)
  729.          {
  730.             style = new CSSStyleDeclaration();
  731.             StyleManager.setStyleDeclaration(".Ingredient",style,false);
  732.          }
  733.          if(style.factory == null)
  734.          {
  735.             style.factory = function():void
  736.             {
  737.                this.fontSize = 15;
  738.             };
  739.          }
  740.          style = StyleManager.getStyleDeclaration(".RecipeDetailsIngredientsPrint");
  741.          if(!style)
  742.          {
  743.             style = new CSSStyleDeclaration();
  744.             StyleManager.setStyleDeclaration(".RecipeDetailsIngredientsPrint",style,false);
  745.          }
  746.          if(style.factory == null)
  747.          {
  748.             style.factory = function():void
  749.             {
  750.                this.color = 0;
  751.                this.backgroundAlpha = 0;
  752.                this.fontSize = 13;
  753.                this.borderThickness = 0;
  754.                this.paddingBottom = -15;
  755.             };
  756.          }
  757.          style = StyleManager.getStyleDeclaration(".RecipeDetailsIngredients");
  758.          if(!style)
  759.          {
  760.             style = new CSSStyleDeclaration();
  761.             StyleManager.setStyleDeclaration(".RecipeDetailsIngredients",style,false);
  762.          }
  763.          if(style.factory == null)
  764.          {
  765.             style.factory = function():void
  766.             {
  767.                this.backgroundAlpha = 0;
  768.                this.fontSize = 13;
  769.                this.borderThickness = 0;
  770.                this.paddingBottom = -15;
  771.             };
  772.          }
  773.          style = StyleManager.getStyleDeclaration(".MainWindow");
  774.          if(!style)
  775.          {
  776.             style = new CSSStyleDeclaration();
  777.             StyleManager.setStyleDeclaration(".MainWindow",style,false);
  778.          }
  779.          style = StyleManager.getStyleDeclaration("VScrollBar");
  780.          if(!style)
  781.          {
  782.             style = new CSSStyleDeclaration();
  783.             StyleManager.setStyleDeclaration("VScrollBar",style,false);
  784.          }
  785.          if(style.factory == null)
  786.          {
  787.             style.factory = function():void
  788.             {
  789.                this.downArrowSkin = _embed_css____assets_skins_swf_ThumbDown_1412742105;
  790.                this.thumbSkin = _embed_css____assets_skins_swf_ThumbBar_209368864;
  791.                this.trackSkin = _embed_css____assets_skins_swf_ThumbTrack_1922948728;
  792.                this.upArrowSkin = _embed_css____assets_skins_swf_ThumbUp_1589808316;
  793.             };
  794.          }
  795.          style = StyleManager.getStyleDeclaration(".Print");
  796.          if(!style)
  797.          {
  798.             style = new CSSStyleDeclaration();
  799.             StyleManager.setStyleDeclaration(".Print",style,false);
  800.          }
  801.          if(style.factory == null)
  802.          {
  803.             style.factory = function():void
  804.             {
  805.                this.selectedDisabledIcon = _embed_css____assets_print_icon_png_92642463;
  806.                this.skin = null;
  807.                this.selectedOverIcon = _embed_css____assets_print_icon_png_92642463;
  808.                this.textRollOverColor = 16610051;
  809.                this.overIcon = _embed_css____assets_print_icon_png_92642463;
  810.                this.fontSize = 13;
  811.                this.selectedDownIcon = _embed_css____assets_print_icon_png_92642463;
  812.                this.fontFamily = "Segoe";
  813.                this.disabledIcon = _embed_css____assets_print_icon_png_92642463;
  814.                this.labelPlacement = "left";
  815.                this.upIcon = _embed_css____assets_print_icon_png_92642463;
  816.                this.selectedUpIcon = _embed_css____assets_print_icon_png_92642463;
  817.                this.downIcon = _embed_css____assets_print_icon_png_92642463;
  818.             };
  819.          }
  820.          style = StyleManager.getStyleDeclaration(".Title");
  821.          if(!style)
  822.          {
  823.             style = new CSSStyleDeclaration();
  824.             StyleManager.setStyleDeclaration(".Title",style,false);
  825.          }
  826.          if(style.factory == null)
  827.          {
  828.             style.factory = function():void
  829.             {
  830.                this.paddingTop = -2;
  831.                this.color = 16777215;
  832.                this.fontWeight = "bold";
  833.                this.fontSize = 20;
  834.             };
  835.          }
  836.          style = StyleManager.getStyleDeclaration(".ShowAll");
  837.          if(!style)
  838.          {
  839.             style = new CSSStyleDeclaration();
  840.             StyleManager.setStyleDeclaration(".ShowAll",style,false);
  841.          }
  842.          if(style.factory == null)
  843.          {
  844.             style.factory = function():void
  845.             {
  846.                this.color = 2627846;
  847.                this.textRollOverColor = 2627846;
  848.                this.fontSize = 13;
  849.                this.labelOffset = 0;
  850.                this.textSelectedColor = 2627846;
  851.             };
  852.          }
  853.          style = StyleManager.getStyleDeclaration(".RecipeDetailsTitlePrint");
  854.          if(!style)
  855.          {
  856.             style = new CSSStyleDeclaration();
  857.             StyleManager.setStyleDeclaration(".RecipeDetailsTitlePrint",style,false);
  858.          }
  859.          if(style.factory == null)
  860.          {
  861.             style.factory = function():void
  862.             {
  863.                this.color = 0;
  864.                this.fontSize = 20;
  865.             };
  866.          }
  867.          StyleManager.mx_internal::initProtoChainRoots();
  868.       }
  869.       
  870.       private function checkUpdate(param1:Event) : void
  871.       {
  872.          var loader:URLLoader = null;
  873.          var event:Event = param1;
  874.          try
  875.          {
  876.             appUpdater.updateURL = Configuration.getInstance().updateUrl;
  877.             if(!LocalFridge.checkIfExists())
  878.             {
  879.                loader = new URLLoader();
  880.                loader.addEventListener(IOErrorEvent.IO_ERROR,updateFail);
  881.                loader.load(new URLRequest(appUpdater.updateURL));
  882.             }
  883.             appUpdater.isCheckForUpdateVisible = false;
  884.             appUpdater.isFileUpdateVisible = false;
  885.             appUpdater.isInstallUpdateVisible = true;
  886.             appUpdater.delay = 1;
  887.             appUpdater.initialize();
  888.          }
  889.          catch(e:Error)
  890.          {
  891.             trace("Error gathering stats");
  892.          }
  893.       }
  894.    }
  895. }
  896.